import 'package:jyofservice/bean/level_tree_data_entity.dart';
import 'package:jyofservice/generated/json/base/json_filed.dart';

levelTreeDataEntityFromJson(LevelTreeDataEntity data, Map<String, dynamic> json) {
	if (json['Code'] != null) {
		data.code = json['Code'].toString();
	}
	if (json['Msg'] != null) {
		data.msg = json['Msg'].toString();
	}
	if (json['Data'] != null) {
		data.data = (json['Data'] as List).map((v) => LevelTreeDataData().fromJson(v)).toList();
	}
	return data;
}

Map<String, dynamic> levelTreeDataEntityToJson(LevelTreeDataEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Code'] = entity.code;
	data['Msg'] = entity.msg;
	data['Data'] =  entity.data?.map((v) => v!.toJson())?.toList();
	return data;
}

levelTreeDataDataFromJson(LevelTreeDataData data, Map<String, dynamic> json) {
	if (json['no'] != null) {
		data.no = json['no'].toString();
	}
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['pId'] != null) {
		data.pId = json['pId'].toString();
	}
	if (json['icon'] != null) {
		data.icon = json['icon'].toString();
	}
	if (json['levela'] != null) {
		data.levela = json['levela'].toString();
	}
	if (json['isParent'] != null) {
		data.isParent = json['isParent'];
	}
	if (json['open'] != null) {
		data.open = json['open'];
	}
	if (json['havegongkuang'] != null) {
		data.havegongkuang = json['havegongkuang'].toString();
	}
	if (json['coun'] != null) {
		data.coun = json['coun'].toString();
	}
	if (json['datastr'] != null) {
		data.datastr = json['datastr'];
	}
	return data;
}

Map<String, dynamic> levelTreeDataDataToJson(LevelTreeDataData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['no'] = entity.no;
	data['name'] = entity.name;
	data['pId'] = entity.pId;
	data['icon'] = entity.icon;
	data['levela'] = entity.levela;
	data['isParent'] = entity.isParent;
	data['open'] = entity.open;
	data['havegongkuang'] = entity.havegongkuang;
	data['coun'] = entity.coun;
	data['datastr'] = entity.datastr;
	return data;
}